// ignore_for_file: prefer_typing_uninitialized_variables, must_be_immutable

import 'package:aitao_flutter/common_ui/confirm_btn.dart';
import 'package:aitao_flutter/res/r.dart';
import 'package:flutter/material.dart';

class ShowYoundModeWindow extends StatefulWidget {
  ShowYoundModeWindow(
      {Key? key, required this.closeModeCallBack, required this.forgetCallBack})
      : super(key: key);
  var closeModeCallBack;
  var forgetCallBack;
  @override
  State<ShowYoundModeWindow> createState() => _ShowYoundModeWindowState();
}

class _ShowYoundModeWindowState extends State<ShowYoundModeWindow> {
  @override
  Widget build(BuildContext context) {
    return Center(
        child: Container(
      padding: const EdgeInsets.only(left: 30, right: 30, bottom: 24),
      margin: const EdgeInsets.only(left: 40, right: 40),
      decoration: const BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.all(Radius.circular(6))),
      child: Column(mainAxisSize: MainAxisSize.min, children: [
        Image.asset(ImagePath.assetsImageYoungSet),
        const SizedBox(height: 10),
        const Text(
          '青少年模式',
          style: TextStyle(fontSize: 18, color: Color(0XFF333333)),
        ),
        const SizedBox(height: 10),
        const Text(
          '您已开启青少年模式,所有功能已关闭',
          style: TextStyle(fontSize: 12, color: Color(0XFF333333)),
        ),
        const SizedBox(height: 20),
        ConfirmButton(
          title: '退出当前模式',
          titleColor: Colors.white,
          backGroundColor: const Color.fromRGBO(210, 134, 254, 1),
          callBack: () {
            Navigator.pop(context);
            widget.closeModeCallBack();
          },
        ),
        const SizedBox(height: 20),
        GestureDetector(
          child: const Text(
            '忘记密码',
            style: TextStyle(
                fontSize: 16, color: Color.fromRGBO(210, 134, 254, 1)),
          ),
          onTap: () {
            widget.forgetCallBack();
          },
        )
      ]),
    ));
  }
}
